package com.zhangxujie.litewords.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;

import com.zhangxujie.litewords.entity.Achievement;
import com.zhangxujie.litewords.entity.ReciteWords;

import java.util.List;

@Dao
public interface AchievementDAO {

//    @Insert
//    void insertAll(Achievement... infos);

    @Query("SELECT * FROM achievement")
    List<Achievement> getAll();

    @Query("SELECT * FROM achievement where id=:id")
    Achievement findById(int id);

    @Update
    void update(Achievement entity);

}
